<table class="table table-striped goods_list_table  table-bordered">
    <thead>
    <tr>
        <th  >商品信息</th>
        <th width="160">
            <a class="sort_a" href="javascript:;" onclick="goSort(this,'load_tb_div');" sort="DESC" id="sort_shop_price" field="shop_price" ><i class="sort_default"></i>当前售价</a>
        </th>
         <th width="230">
          其他信息
        </th>
        <th width="100">
            <a class="sort_a" href="javascript:;" onclick="goSort(this,'load_tb_div');" sort="DESC" id="sort_goods_number" field="goods_number" ><i class="sort_default"></i>实际库存</a>
        </th>
        <th width="100">
            <a class="sort_a" href="javascript:;" onclick="goSort(this,'load_tb_div');" sort="DESC" id="sort_wait_sendgoods_stock" field="wait_sendgoods_stock" ><i class="sort_default"></i>待发货数</a>
        </th>
        <th width="100">
            <a class="sort_a" href="javascript:;" onclick="goSort(this,'load_tb_div');" sort="DESC" id="sort_can_sale_goods_number" field="can_sale_goods_number" ><i class="sort_default"></i>可售库存</a>
        </th>
        <th width="120">操作</th> 
    </tr> 
    </thead>
    <tbody id="tbodylist">
    <volist name="_datalist['lists']" id="g">
        <tr id="goods_item_{$g['goods_id']}">
            <td>
                <table style="width:100%;">
                    <tr>
                            <!--/attas/-->
                        <td class="goods_details_dl" valign="top">
                            <img src="/{$g['goods_img']}" onerror="this.src='/themes/images/nopicture.jpg'" class="img">
                        </td>
                        <td valign="top" style="padding-left:4px;" class=" left-align">
                            <div class="col-sm-12 left-align color_333"> </div>
                            <div class="clearfix"></div>
                            <div class="col-sm-12 left-align">
	                            <a target="_blank" title="查看商品详情" class="goods_name color_333" href="/goods.php?id={$g['goods_id']}">
	                            	{$g['goods_name']|default='!!!未录入商品中文名称，请录入'}
	                            </a>  
	                        </div>              
                            <div style="height:10px;width:100%;clear:both;">&nbsp;</div>
                          
                            <div class="clearfix"></div>
            
							<div class="col-sm-12 left-align">
								<if condition="$g['is_on_sale'] eq 1">
                                    <span class="badge badge-success">已上架</span>
                                <else/>
                                    <span class="badge badge-danger">已下架</span>
                                </if>   
                                
                                <if condition="$g['is_new'] eq 1">
                                    <span class="badge badge-success">新品</span>
                                </if>
                                <if condition="$g['is_best'] eq 1">
                                    <span class="badge badge-primary">精品</span>
                                </if>                                
                                <if condition="$g['is_hot'] eq 1">
                                    <span class="badge badge-warning">热销</span>
                                </if>
                                <if condition="$g['is_promote'] eq 1">
                                    <span class="badge badge-primary">特卖</span>
                                </if>                                                                     
                            </div>
                        </td>
                    </tr>
                </table>

            </td>
            <td>{$g['shop_price']}</td>  
            <td>
                <div class='otherinfotext' >分类名称：{$g['cat_id']|getGoodsCategory}</div>
                <div class='otherinfotext' >品牌名称：{$g['brand_id']|getGoodsBrandName}</div>
                <div class='otherinfotext' >规格数量：{$g['attrs_count']}</div>
            </td>
           
            <td>{$g['goods_number']}</td>
            <td>{$g['wait_sendgoods_stock']}</td>
			<td>{$g['can_sale_goods_number']}</td>
            <td>                
                <div>
                    <a target="_blank" href="/goods.php?id={$g['goods_id']}" class="btn btn-default btn-xs" data-url="{:U('one_sale',array('id'=>$g['goods_id'],'is_on_sale'=>1))}">查看</a>
              
                    <a class="btn btn-default btn-xs" onclick="_es_openDilog902('{:U('edit',array('goods_id'=>$g['goods_id']))}','商品编辑')" href="javascript:;">编辑</a>
                    <a class="btn btn-xs {$g['btnStyle']}" data-id="{$g['goods_id']}" onclick="loaddingAttrItems(this,'{$g['goods_item_id']}');" href="javascript:;">
                    	<img class="attrs_img_close" src="/Public/Admin/images/sanjiao.png?v={:C('CURRENT_FILE_VERSION')}" />多规格
                    </a>
                </div>
            </td>
        </tr>
    </volist>

    <empty name="_datalist['lists']">
        <tr>
            <td style="padding:30px;text-align:center;" colspan="7">
                暂无相关记录
            </td>
        </tr>
    </empty>

    </tbody>
</table>

<div class="page_list_ops dataTables_paginate paging_bootstrap pagination">
    {$_datalist['page_html']}
</div>

<script type="text/javascript">
    $("#sort_{$_sort_column}").attr('sort','<eq name="_sort" value="ASC" >DESC<else/>ASC</eq>').find('i').addClass('sort_{$_sort}')
    _load_off_salenumber();
</script>
